<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<div th:replace="~{heard::heardDiv}"></div>
<h2>hello <span th:utext="${username2}">xxxxx</span></h2>

<br>
<input type="text"  th:value="${username}">
<br>
<input type="radio" th:checked="${sex ==2}">男
<input type="radio" th:checked="${sex ==1}">女
<br>
<select >

    <option th:selected="${city=='yueyang'}">岳阳</option>
    <option th:selected="${city=='changsha'}">长沙</option>
    <option th:selected="${city=='taiyuan'}">太原</option>
</select>

<br>
<table border="1">
    <tr>
        <th>序号</th>
        <th>姓名</th>
        <th>密码</th>
    </tr>
    <tr th:each="u,sta:${users}">
        <td th:text="${sta.count}"></td>
        <td th:text="${u.username}"></td>
        <td th:text="${u.pass}"></td>
    </tr>

</table>
<br>
<h2>th:if</h2>
<div th:if="${username=='admin'}">管理员</div>

<h2>th:attr</h2>

<input type="text" th:attr="user=${username}" >


<br>
<a th:href="@{/login(username='zhangsan')}">点击一下</a>

<h2>th:action学习</h2>
<form th:action="@{/login}" method="get">
    账号<input type="text" name="username">
    密码<input type="text" name="pass">
    <input type="submit" value="登录">
</form>

<br>
<span th:text="${#dates.format(nowTime,'yyyy-MM-dd HH:mm:ss')}"> </span>

</body>
</html>
